package com.skymxc.wandroidtodo.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * <p>
 *
 * </p>
 *
 * @author 孟祥超
 * <p>
 * date: 2021/12/2  10:15 下午
 */
public class TODOItem implements Parcelable {


    /**
     * {"completeDate":null,"completeDateStr":"","content":"使用 wanAndroid 写完 MVP版本","date":1638460800000,"dateStr":"2021-12-03","id":28111,"priority":1,"status":0,"title":"ToDo mvp版本","type":1,"userId":119120}
     */
    private long id;
    private String title;
    private String content;
    private long date;
    private String dateStr;
    private int type;
    private int priority;
    //0 // 0为未完成，1为完成;
    private int status = 0;

    private long completeDate;
    private String completeDateStr;

    public TODOItem() {
    }

    protected TODOItem(Parcel in) {
        id = in.readLong();
        title = in.readString();
        content = in.readString();
        date = in.readLong();
        dateStr = in.readString();
        type = in.readInt();
        priority = in.readInt();
        status = in.readInt();
        completeDate = in.readLong();
        completeDateStr = in.readString();
    }

    public static final Creator<TODOItem> CREATOR = new Creator<TODOItem>() {
        @Override
        public TODOItem createFromParcel(Parcel in) {
            return new TODOItem(in);
        }

        @Override
        public TODOItem[] newArray(int size) {
            return new TODOItem[size];
        }
    };

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public long getDate() {
        return date;
    }

    public void setDate(long date) {
        this.date = date;
    }


    public String getDateStr() {
        return dateStr;
    }

    public void setDateStr(String dateStr) {
        this.dateStr = dateStr;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public long getCompleteDate() {
        return completeDate;
    }

    public void setCompleteDate(long completeDate) {
        this.completeDate = completeDate;
    }

    public String getCompleteDateStr() {
        return completeDateStr;
    }

    public void setCompleteDateStr(String completeDateStr) {
        this.completeDateStr = completeDateStr;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeLong(id);
        parcel.writeString(title);
        parcel.writeString(content);
        parcel.writeLong(date);
        parcel.writeString(dateStr);
        parcel.writeInt(type);
        parcel.writeInt(priority);
        parcel.writeInt(status);
        parcel.writeLong(completeDate);
        parcel.writeString(completeDateStr);
    }
}
